// .txt

beginzonescript;

variables;

short crime_tolerance = 200;
short last_abil;
short i;

body;

beginstate INIT_STATE;

	set_name(12,"Bilious Rotghroth");
	set_level(12,28);
	set_boss_level(12,2);
	
	add_range_to_group(13,16,1);
	set_name(1001,"Writhing Rotworm");
	set_level(1001,20);
	set_boss_level(1001,2);
	set_new_abil(1001,2);
	
	//if (get_sdf() > 0) {
		//make_zone_hostile();
		//}

	last_abil = get_current_tick();
	
	set_crime_tolerance(crime_tolerance);
	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	// clear zone?
	//if ((zone_clear(ME) == FALSE) && (get_flag(,) > 0)) {
		//print_str_color("",2);
		//clear_zone(ME);	
		//}
		
	//if ((get_crime_level() >= crime_tolerance) && (get_sdf(,) == 0)) {
	//	make_zone_hostile();
	//	set_flag(,,1);
	//	}

	// if (gf(,) == 0) {
	//	if (get_ran(1,0,100) < 10)
	//		give_char_text_bubble(,"");
	//	}
	
	//if (((is_combat()) && (tick_difference(last_abil,get_current_tick()) > 0)) || ((is_group()) && (tick_difference(last_abil,get_current_tick()) > 5))) {
	//	last_abil = get_current_tick();
	//	}
break;

beginstate 10;
	if (gf(100,10) == 0) {
		sf(100,10,1);
		print_str_color("You have found the eastern entrance of the Shadow Road.",2);
		award_party_xp(100,12);
		}
break;

beginstate 11;
	set_terrain_string_range("The passage to the east is blocked by tons of rubble. It probably leads up to a ruin on the surface.",3);
break;

//	print_str("");
//	set_terrain_string_range(".",3);
//	set_terrain_string_range("The sign says - .",3);
